/*
 * File:   Scheduler.cpp
 * Author: James
 *
 * Created on November 7, 2010, 8:31 AM
 */

#include "Process.h"

class CompareIOCompletion {
public:
    // returns true if p1 finishes IO before p2
    bool operator() (Process& p1, Process& p2) {
        if (p1.getIOCompletion() < p2.getIOCompletion()) {
            return true;
        } else return false;
    }
private:

};

class ComparePriority {
public:
    // returns true if p1 has a higher proirity than p2
    bool operator() (Process& p1, Process& p2) {
        if (p1.getPriority() > p2.getPriority()) {
            return true;
        } else return false;
    }

};

class CompareDeadline {
public:
    // returns true if p1 has a lower deadline than p2
    bool operator() (Process& p1, Process& p2) {
        if (p1.getDeadline() < p2.getDeadline()) {
            return true;
        } else return false;
    }

};
